<?php

namespace app\api\model;

class ConfigSystem extends Common
{
    static public function index($category='', $title='')
    {
        if ($category && $title) {
            $data = self::where(['category' => $category, 'title' => $title])->column('title, content');
        } else if ($category) {
            $data = self::where(['category' => $category])->column('title, content');
        } else if ($title) {
            $data = self::where(['title' => $title])->column('title, content');
        } else {
            $data = self::column('title, content');
        }

        return $data;
    }
}
